home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
A-Monthly Disks
/
(c)abi.d64
/
world conquest
(
.txt
)
< prev
Wrap
Commodore BASIC
|
2007-02-04
|
10KB
|
334 lines
10 REM**********************
20 REM* WORLD CONQUEST *
25 REM* *
30 REM* HOWARD CAMPBELL *
31 REM* 3463 PIPER DRIVE *
32 REM* NORTHWOOD, OHIO *
33 REM* 43619 *
34 REM* (419) 698-1195 *
35 REM**********************
36 :
50 DIMRO%(51),CL%(51),SC(51),CO%(51),TR%(51),BO%(51,5)
60 R=RND(-TI):MO=0
90 PRINT"[147]";:POKE53280,0:POKE53281,0:POKE646,7
92 GOSUB6000:GOSUB9100:FORI=1TO10:GOSUB9500:NEXTI:GOSUB30000:GOSUB30000
93 PRINT"INSTRUCTIONS? Y OR N"
94 GETA$:IFA$=""THEN94
98 IFA$="Y"THENGOSUB20000
99 PRINT"[147]";:GOTO 2000
100 REMCOMPUTER'S SELECTION OF POA
105 P1=1:P2=0:CO=2
108 LA=AT:F=0
110 B1=1:E1=50:S1=1:R=RND(.):IFR>.5THENE1=25
115 R=RND(.):IFR>.5THENB1=50:E1=1:S1=-1:R=RND(.):IFR>.5THENB1=25
120 K=0:L=0:FORI=B1TOE1STEPS1:R=RND(.)
130 IFCO%(I)<>2THEN150
140 IFR>.3THENK=1:BA=I:I=E1
150 NEXTI
151 IFCO%(LA)=2ANDF=0THENBA=LA:K=1:GOTO160
152 IFCO%(LA-(LA<50))=2ANDF=0THENK=1:BA=LA+1:GOTO160
153 IFCO%(LA-(LA>1))=2ANDF=0THENK=1:BA=LA-1:GOTO160
160 F=1:FORJ=1TO4
165 IFCO%(BO%(BA,J))=7THENAT=BO%(BA,J):L=1
169 NEXTJ:IFK=0ORL=0THEN110
172 PRINT"";:PRINTSPC(33)"BASE [157][157][157]"BA
173 PRINT"";:PRINTSPC(33)" "
180 R=INT(RND(.)*2+1):IFTR%(BA)<=2THENR=1
182 IFTR%(BA)>=TR%(AT)THENR=2
185 ON R GOSUB200,300
190 RETURN
200 REMCOMPUTER TROOP BUILD-UP
205 PRINT"";:PRINTSPC(33)"DEPLOY"
210 TP=INT(TE%(P1)*.2):IFTP<5THENTP=5
220 TR%(BA)=TR%(BA)+TP
230 GOSUB560
240 RETURN
300 REMATTACK MODE
302 PRINT"";:PRINTSPC(33)"ATT."AT
310 SA=INT(TR%(BA)*.2+.5)
320 CA%(0)=INT(RND(.)*3):CA%(1)=INT(RND(.)*3)
325 GOSUB9000
330 TR%(BA)=TR%(BA)-CA%(1):IFTR%(BA)<=1THENTR%(BA)=1:WIN=1
340 TR%(AT)=TR%(AT)-CA%(0):IFTR%(AT)<=0THENGOSUB400:RETURN
350 IFTR%(BA)>SAANDP1=1THEN320
360 GOSUB500:RETURN
400 REMOCCUPATION
410 TR%(AT)=INT(TR%(BA)*.5):TR%(BA)=TR%(BA)-TR%(AT)
420 P=SC(AT):POKEP,CO:POKEP+1,CO:POKEP+2,CO:POKEP+3,CO:POKEP+40,CO:POKEP+41,CO
430 POKEP+42,CO:POKEP+43,CO:POKEP+80,CO:POKEP+81,CO:POKEP+82,CO:POKEP+83,CO
435 CO%(AT)=CO
440 TE%(P1)=TE%(P1)+1:TE%(P2)=TE%(P2)-1
450 GOSUB500:WIN=1:RETURN
500 REMPOSITION AND PRINT
510 PRINT"";:SC$=STR$(TR%(AT))
515 LE=LEN(SC$):SC$=RIGHT$(SC$,LE-1)
520 IFCL%(AT)=0THEN540
530 FORI=1TOCL%(AT):PRINT"";:NEXT
540 FORI=1TORO%(AT):PRINT"";:NEXT
550 PRINT"[150] [157][157]"SC$
560 PRINT"";:SC$=STR$(TR%(BA))
565 LE=LEN(SC$):SC$=RIGHT$(SC$,LE-1)
570 IFCL%(BA)=0THEN580
575 FORI=1TOCL%(BA):PRINT"";:NEXT
580 FORI=1TORO%(BA):PRINT"";:NEXT
590 PRINT"[150] [157][157]"SC$
595 RETURN
1000 PRINT"1 [170]2 [170]3 [170]4 [223]"
1010 PRINT" [170] [170] [170] "
1020 PRINT"[175][175][175][186][175][175][175][186][175][175][175][186][175][175][175][175]"
1030 PRINT"5 [170]6 [170]7 [170]8 "
1040 PRINT" [170] [170] [170] "
1050 PRINT"[175][175][175][186][175][175][175][186][175][175][175][186][175][175][175][175]"
1060 PRINT"9 "
1070 PRINT" "
1080 PRINT"[175][175][175][175]"
1090 PRINT"10 [170]11 [170]12 [170]13 [223]"
1100 PRINT" [170] [170] [170] "
1110 PRINT"[175][175][175][186][175][175][175][186][175][175][175][186][175][175][175][175]"
1120 PRINT"14 [170]15 [170]16 [170]17 [170]26 [170]
1130 [153]" + + + + +
1140 PRINT"[175][175][175][186][175][175][175][186][175][175][175][186][175][175][175][186][175][175][175][186]
1150 [153]"18 +19 +20 +21 "
1160 [153]" + + + "
1170 [153]"ANDANDANDSQRANDANDANDSQRANDANDANDSQRANDANDANDAND"
1180 [153]"22 +23 +24 +25 "
1190 [153]" + + + "
1200 [153]"(null)ANDANDSQRANDANDANDSQRANDANDANDSQRANDANDANDWAITSTEP"
1210 [153]""[166]20)"27 +28 (null)"
1220 [153][166]20)" + "
1230 [153][166]20)"ANDANDANDSQRANDANDANDAND"
1240 [153][166]20)"29 +30 "
1250 [153][166]20)" + "
1260 [153][166]20)"ANDANDANDSQRANDANDANDAND"
1270 [153][166]20)"31 +32 +33 (null)"
1280 [153][166]20)" + + "
1290 [153][166]20)"ANDANDANDSQRANDANDANDSQRANDANDANDAND"
1300 [153][166]20)"34 +35 +36 "
1310 [153][166]20)" + + "
1320 [153][166]20)"ANDANDANDSQRANDANDANDSQRANDANDANDAND"
1330 [153][166]20)"37 +38 +39 45 (null)";
1340 [153][166]20)" + + ";
1350 [153][166]20)"ANDANDANDSQRANDANDANDSQRANDANDANDANDANDANDANDAND";
1360 [153][166]20)"40 +41 +42 +43 +44 ";
1370 [153][166]20)" + + + + ";
1380 [153][166]20)"ANDANDANDSQRANDANDANDSQRANDANDANDSQRANDANDANDSQRANDANDANDAND";
1390 [153][166]20)"46 +47 +48 +49 +50 ";
1400 [153][166]20)" + + + + WAIT";
1410 [153][166]20)"(null)ANDANDSQRANDANDANDSQRANDANDANDSQRANDANDANDSQRANDANDANDWAITSTEP"
1411 [153]""[166]28)"PRINT(null)LENLENLENLENLENLENLENLENLENLENRIGHT$";
1412 [153][166]28) "PEEK WORLD PEEK" ;
1413 [153][166]28) "PEEK CONQUEST PEEK" ;
1414 [153][166]28) "MID$LENLENLENLENLENLENLENLENLENLEN(null)" ;
1415 [153]"";:[153][166]32)"CONTCOMPUTER";:[153][166]34)"MOVES"
1420 [142]
2000 [143]MAIN TRUNK
2010 [141]1000
2030 :
2040 [141]7000
2050 [141]100
2060 [139]TE%(1)[178]50 [167] [141]4000:[153]"COMPUTER WINS":[137]9600
2070 [141]3000:[141]5000
2080 [139]TE%(0)[178]50 [167][141]4000:[153]"YOU WIN":[137]9600
2090 [137] 2050
3000 [143]PLAYER SELECTION OF POA
3010 [141]4000:CO[178]7:P1[178]0:P2[178]1
3020 [151]198,0:[153]"SYSENTER PLAYING POSITION PRINT";:L[178]2:C[178]7:N[178]1:[141]29700
3022 BA[178][197](A$)
3030 [139]BA[179]1[176]BA[177]50[167]3000
3031 [139]CO%(BA)[178]2[167]3000
3040 [141]4000:[153][166]10)"F1WAIT - ATTACK":[153][166]10)"F3WAIT - DEPLOY":[151]198,0
3050 A$[178]"":[161]A$:[139]A$[179][177]"INPUT"[175]A$[179][177]"DIM"[167]3050
3060 A[178][198](A$)[171]132:[145] A [141]3200,210
3070 [141]4000:[142]
3200 [143]PLAYER ATTACK MODE
3210 [141]4000:[153]"SYSENTER POSITION OF AREA UNDER ATTACK PRINT";:L[178]2:N[178]1:WIN[178]0
3215 [141]29700:AT[178][197](A$)
3220 K[178]0:[129]I[178]1[164]4:[139]AT[178]BO%(BA,I)[167]K[178]1
3230 [130]I:[139]K[178]0[167]3200
3235 [141]4000
3240 [141]320:[139]WIN[178]1[167][142]
3250 [141]4020:[153]"SYSCONTINUE ATTACK? YWAIT OR NWAIT"
3260 [161]A$:[139]A$[179][177]"Y"[175]A$[179][177]"N"[167]3260
3270 [139]A$[178]"Y"[167]3240
3275 [141]4000
3280 [142]
4000 [143]ERASE BOTTOM AND POSITION PRINT
4010 [158] 924
4020 [153]"";:[129]I[178]1[164]22:[153]"";:[130]
4030 [142]
5000 MO[178]MO[170]1:[153]"OPEN"MO:[153]"MOVES":[142]
6000 [129]I[178]1[164]50:CO%(I)[178]7:TR%(I)[178]5:[130]
6010 TE%(0)[178]25:TE%(1)[178]25
6020 [129]I[178]1[164]50
6030 [135] CL%(I),RO%(I),SC(I)
6040 [129]J[178]1[164]4:[135]BO%(I,J):[130]
6050 [130]I
6055 [129]I[178]960[164]1022:[135]A:[151]I,A:[130]
6056 [151]2040,15:V[178]53248:[151]V[170]39,10:[151]V[170]28,1:[151]V[170]37,7:[151]V[170]38,0
6060 [142]
6070 [131] 0 , 1,55296,0 ,0 ,5 ,2
6080 [131] 4 , 1,55300,1 ,6 ,3 ,0
6090 [131] 8 , 1,55304,2 ,7 ,4 ,0
6100 [131] 12, 1,55308,3 ,8 ,0 ,0
6110 [131] 0 , 4,55416,0 ,0 ,6 ,1
6120 [131] 4 , 4,55420,5 ,0 ,7 ,2
6130 [131] 8 , 4,55424,6 ,9 ,8 ,3
6140 [131] 12, 4,55428,7 ,9 ,0 ,4
6150 [131] 10, 7,55546,7,8,12,13
6160 [131] 0 ,10,55656,0 ,14,11,0
6170 [131] 4 ,10,55660,10,15,12,0
6180 [131] 8 ,10,55664,11,16,13,9
6190 [131] 12,10,55668,12,17,9 ,0
6200 [131] 0 ,13,55776,0 ,18,15,10
6210 [131] 4 ,13,55780,14,19,16,11
6220 [131] 8 ,13,55784,15,20,17,12
6230 [131] 12,13,55788,16,21,26,13
6240 [131] 0 ,16,55896,0 ,22,19,14
6250 [131] 4 ,16,55900,18,23,20,15
6260 [131] 8 ,16,55904,19,24,21,16
6270 [131] 12,16,55908,20,25,0 ,17
6280 [131] 0 ,19,56016,0 ,0 ,23,18
6290 [131] 4 ,19,56020,22,0 ,24,19
6300 [131] 8 ,19,56024,23,0 ,25,20
6310 [131] 12,19,56028,24,0 ,0 ,21
6320 [131] 16,13,55792,17,0 ,37,0
6330 [131] 20,1 ,55316,0,29,28,0
6340 [131] 24,1 ,55320,27,30,0,0
6350 [131] 20,4 ,55436,0,31,30,27
6360 [131] 24,4 ,55440,29,32,0,28
6370 [131] 20,7,55556,0,34,32,29
6380 [131] 24,7,55560,31,35,33,30
6390 [131] 28,7,55564,32,36,0,0
6400 [131] 20,10,55676,0,37,35,31
6410 [131] 24,10,55680,34,38,36,32
6420 [131] 28,10,55684,35,39,0,33
6430 [131] 20,13,55796,26,40,38,34
6440 [131] 24,13,55800,37,41,39,35
6450 [131] 28,13,55804,38,42,0,36
6460 [131] 20,16,55916,0,46,41,37
6470 [131] 24,16,55920,40,47,42,38
6480 [131] 28,16,55924,41,48,43,39
6490 [131] 32,16,55928,42,49,44,0
6500 [131] 36,16,55932,43,50,0,45
6510 [131] 36,13,55812,0,44,0,0
6520 [131] 20,19,56036,0,0,47,40
6530 [131] 24,19,56040,46,0,48,41
6540 [131] 28,19,56044,47,0,49,42
6550 [131] 32,19,56048,48,0,50,43
6560 [131] 36,19,56052,49,0,0,44
6570 [131] 0,0,0,24,0,128,0,0,64,1,130,2,128,1,9,96,104,36
6580 [131] 24,4,144,6,98,64,1,145,0,0,84,0,170,101,85,85,86,170,1,148,0,6,153
6590 [131]0,24,146,64,96,144,144,128,128,36,0,144,9,0,0,2,0,144,0,0,0,0
7000 [143]SELECT COMPUTER'S POSITIONS
7010 [129]I[178]1[164]25
7020 R[178][181]([187](.)[172]50[170]1)
7030 [139]CO%(R)[178]2[167]7020
7040 CO%(R)[178]2
7050 P[178]SC(R):[151]P,2:[151]P[170]1,2:[151]P[170]2,2:[151]P[170]3,2:[151]P[170]40,2:[151]P[170]41,2
7060 [151]P[170]42,2:[151]P[170]43,2:[151]P[170]80,2:[151]P[170]81,2:[151]P[170]82,2:[151]P[170]83,2
7070 [130]I
7080 [129]BA[178]1[164]50:[141]560:[130]BA
7090 [142]
7091 BA[178]25:AT[178]26
8000 SO[178]54272
8010 [151]SO,12:[151]SO[170]1,1:[151]SO[170]24,15
8020 [151]SO[170]5,15:[151]SO[170]6,252:[151]SO[170]4,129
8030 [142]
8040 SO[178]54272
8050 [151]SO[170]7,12:[151]SO[170]8,1:[151]SO[170]24,15
8060 [151]SO[170]12,15:[151]SO[170]13,252:[151]SO[170]11,129
8070 [142]
9000 Y[178]43[170]7.52[172](RO%(AT))
9005 Y1[178]43[170]7.52[172](RO%(BA))
9010 X[178]17[170]7.09[172](CL%(AT)[170]3)
9015 X1[178]17[170]7.09[172](CL%(BA)[170]3)
9020 [139]X[177]255[167][151]V[170]16,1:X[178]X[171]255
9025 [139]X1[177]255[167][151]V[170]16,3:X1[178]X1[171]255
9030 [151]V,X:[151]V[170]1,Y:[151]V[170]21,1
9040 [141]8000:[151]V[170]21,0
9045 [151]V,X1:[151]V[170]1,Y1:[151]V[170]21,1
9046 [141]8040:[151]V[170]21,0:[151]V[170]16,0
9049 [151]SO[170]4,128:[151]SO[170]11,128
9050 [142]
9100 [153]"LOAD"
9105 A$[178]" SGN THEN (null)USR(null) (null)USR(null) FN (null)(null) ":[141]10000:[141]9500
9110 A$[178]" SGN PEEK THEN SGN THEN (null)ANDSQR FN SGN SGN ":[141]10000:[141]9500
9120 A$[178]" SGN PEEK THEN SGN THEN SGN(null) FN SGN SGN ":[141]10000:[141]9500
9130 A$[178]" (null)ANDPEEKANDSQR (null)ANDSQR SGN (null) (null)ANDAND (null)(null) ":[141]10000:[141]9500
9140 A$[178]" ":[141]10000
9150 A$[178]"(null)USRUSR (null)USR(null) (null)USR(null) (null)USR(null) FN THEN (null)USRUSR (null)USRUSR USR(null)USR":[141]10000:[141]9500
9160 A$[178]"FN FN THEN FN THEN FN THEN FN THEN FN (null) THEN":[141]10000:[141]9500
9170 A$[178]"FN FN THEN FN THEN FN THEN FN THEN (null)USRUSR USR(null) THEN":[141]10000:[141]9500
9180 A$[178]"(null)ANDAND (null)ANDSQR FN THEN (null)ANDSQR (null)ANDSQR (null)ANDAND ANDANDSQR THEN":[141]10000:[141]9500
9190 A$[178]" (null) ":[141]10000:[141]9500
9200 [153]"":A$[178]"WRITTEN BY:":[141]10000:A$[178]"HOWARD CAMPBELL II":[141]10000
9210 [142]
9500 [143]RANDOM EXPLOSIONS
9510 X[178][187](.)[172]200[170]50
9520 Y[178][187](.)[172]200[170]50
9530 X1[178][187](.)[172]200[170]50
9540 Y1[178][187](.)[172]200[170]50
9550 [141]9020
9560 [142]
9600 [129]I[178]1[164]100:[141]9500:[130]I:[128]
10000 A[178][195](A$):[139]A[173]2[179][177][181](A[173]2)[167]A$[178]" "[170]A$:[137]10000
10010 [129]I[178]1[164]A[173]2:[153][163]19[171]I);[200](A$,I);[201](A$,I):[153]"ON";
10020 [130]I:[153]:[142]
20000 [153]"LOADPRINTTHE REDSPRINT ARE INTENT ON WORLD DOMINATION.";
20010 [153]"YOU ARE THE COMMANDER OF THE SYSYELLOWPRINT "
20020 [153]"ARMY WHOSE MISSION IS TO KEEP YOUR "
20030 [153]"WORLD FREE BY DEFEATING THE RED ARMY "
20040 [153]"IN ALL OF THE STATES ON YOUR WORLD'S "
20050 [153]"THREE CONTINENTS. "
20060 [153]"EACH TURN YOU ARE GIVEN THE OPTION OF "
20070 [153]"ATTACKING THE RED ARMY ON A DIRECT FRONT";
20080 [153]"OR BUILDING UP YOUR TROOPS IN A GIVEN "
20090 [153]"STATE. "
20100 [153]"IF YOU CHOOSE TO ATTACK THE ENEMY YOU "
20110 [153]"MUST HAVE OVER 1 TROOP IN THE ATTACKING"
20120 [153]"FRONT. IF YOU WIN, THE STATE WILL TURN "
20130 [153]"TO YOUR COLOR. "
20132 [153]"THE NUMBER OF TROOPS IS GIVEN IN DEFPINKPRINT "
20134 [153]"IN THE CENTER OF EACH STATE. THE NUMBER";
20138 [153]"OF THE STATE IS IN THE UPPER LEFT "
20139 [153]"CORNER. "
20140 [153]"BEWARE!! THE ENEMY COMMANDER IS CLEVER "
20150 [153]"AND SHOWS NO MERCY!!! HE MAY ATTACK YOU"
20160 [153]"OR BUILD UP TROOPS TO CARRY OUT HIS "
20170 [153]"OWN PLAN TO DEFEAT YOUR ARMIES. "
20180 [153]"GOOD LUCK!!! "
20200 [153][166]8)"SYSPRESS <SPACE> TO CONTINUE"
20210 [161]A$:[139]A$[178]""[167] 20210
20220 [142]
29700 [151]251,L : [143]INPUT LENGTH
29710 A$[178]"" : [143]INITIALIZE
29720 [158]828 : [143]ACTIVATE IRQ WEDGE
29730 [151]646,C : [143]SET INPUT COLOR
29740 [159]1,0:[132]1,A$:[160]1
29750 [139]A$[178]""[167]29040
29755 F[178]0
29760 [129]I[178]1[164][195](A$) : [143]CHECK NUMERIC INPUT
29770 [139]N[178]1[167][139][198]([202](A$,I))[179]48[176][198]([202](A$,I))[177]57[167]F[178]1
29780 [130]I
29785 [139]F[178]1[167]29740
29790 [158] 911 : [143]DEACTIVATE IRQ WEDGE
29800 [142]
30000 [135]L :[143]START POSITION OF ML ROUTINE
30010 [135]A$:[139]A$[178]"*"[167][142]
30020 [143]CONVERT HEXADECIMAL TO DECIMAL
30030 A[178][198](A$)[171]48:B[178][198]([201](A$,1))[171]48
30040 N[178]B[170]7[172](B[177]9)[170](16[172](A[170]7[172](A[177]9)))
30050 [151]L,N:L[178]L[170]1:[137]30010
30060 [131]828
30070 [131]38,20,F0,FF,86,FD,84,FE,18,A5,FE,65,FB,85,FC,A6,FB,A9,11,20,D2,FF
30080 [131]A9,B7,20,D2,FF,CA,D0,FA,20,86,03
30090 [131]78,A9,6A,8D,14,03,A9,03,8D,15,03,58,60
30100 [131]38,20,F0,FF,C4,FC,90,03,20,86,03,C4,FE,B0,03,20,86,03,E4,FD,F0,03
30110 [131]20,86,03,4C,31,EA,18,A6,FD,A4,FE,20,F0,FF,60
30120 [131]78,A9,31,8D,14,03,A9,EA,8D,15,03,58,60,*
30130 [131] 924
30140 [131] A0,50,A9,20,99,6F,07,88,D0,FA,60,*
60000 [129]I[178]2048[164][194](45)[170][194](46)[172]256
60010 [139][194](I)[178]143[175][194](I[170]1)[178]32[167][151]I[170]1,18
60020 [130]